package com.zkt.auth.common.enums;

import lombok.Getter;

/**
 * @author 赵开泰
 * @program jc-club
 * @date 2025/3/22
 * @description 用户状态枚举
 **/

@Getter
public enum AuthStatusEnum {
	
	OPEN(0, "启用"),
	CLOSE(1, "禁用");
	
	public int code;
	
	public String desc;
	
	AuthStatusEnum(int code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	public static AuthStatusEnum getByCode(int codeVal) {
		for (AuthStatusEnum resultCodeEnum : AuthStatusEnum.values()) {
			if (resultCodeEnum.code == codeVal) {
				return resultCodeEnum;
			}
		}
		return null;
	}
}
